<?php
namespace app\admin\controller;



use think\Db;
use think\Session;

class Index extends Base
{
    public function index()
    {
        $username = Session::get('username');
        $user_perm = getUserPerm($username);
        $this->assign(['username' => $username]);
        return $this->fetch();
    }


    public function welcome(){
        $systemInfo = systemInfo();
        $username = Session::get('username');
        $userInfo = Db::name('user')->where('username',$username)->find();
        $last_login_time = $userInfo['last_login_time'];
        $this->assign('systemInfo',$systemInfo);
        $this->assign('userInfo',$userInfo);
        $this->assign('last_login_time',$last_login_time);
        return $this->fetch();
    }

}
